#include "Computer.h"

void test()
{
    cout << "sizeof(Computer) = " << sizeof(Computer) << endl;

    cout << endl;
    cout << "一台电脑都没有购买，那么总价 " << endl;
    /* Computer("", 0).printTotalPrice(); */
    Computer::printTotalPrice();

    cout << endl;
    Computer com("xiaomi", 7000);
    cout << "com = ";
    com.print();
    cout << "购买第一台电脑的总价 " << endl;
    com.printTotalPrice();
    Computer::printTotalPrice();

    cout << endl;
    Computer com2("huawei", 9000);
    cout << "com2 = ";
    com2.print();
    cout << "购买两台电脑的总价 " << endl;
    com2.printTotalPrice();
    com.printTotalPrice();
    Computer::printTotalPrice();

    /* Computer::print();//error */
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

